package com.lagou.edu.controller;

import com.lagou.edu.pojo.Comment;
import com.lagou.edu.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class CommentController {

    @Autowired
    private CommentService commentService;


    @ResponseBody
    @RequestMapping("/findCommentById")
    public Comment findCommentById(Integer id){
        Comment comment= commentService.findCommentById(id);
        return comment;
    }
}
